<template>
    <div id="swipe">
<!--        mint-ui轮播图-->
        <mt-swipe :auto="2000" class="swipe_style" >
                <mt-swipe-item v-for="(item,index) in message" v-bind:key="index">
                    <img :src=item.image @load="tabControl">
                </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
    export default {
        name: "Swipe",
        props: {
                message:Array
            },
        data(){
            return{
                isLoad:false
            }
        },
        methods:{
            tabControl(){
                if (!this.isLoad){
                    this.$emit('imageLoad');
                    this.isLoad = true
                }
            }
        }

    }
</script>

<style scoped>
.swipe_style {
    width: 100%;
    height: 150px;
    z-index: -1;
}
    img{
        width: 100%;
    }
</style>